﻿<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8" />
    <title>@ViewBag.Title</title>
    <meta name="viewport" content="width=device-width" />
    <link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" />
    @Styles.Render("~/Content/mobileCss", "~/Content/css")
    @Scripts.Render("~/bundles/modernizr")
    <script src="~/Scripts/jquery-1.7.1.min.js"></script>
    <script src="~/Scripts/jquery.signalR-1.0.1.min.js"></script>
    <script src="~/signalr/hubs"></script>

    @{
        try
        {
            MembershipUser currentUser = System.Web.Security.Membership.GetUser(true);
            System.Web.Security.Membership.UpdateUser(currentUser);
            //þetta updeitar LastActivityDate í hvert skipti sem notandi ráfar um síðuna.
        }
        catch
        {
            //ekkert gerist? - ef notandi er ekki innskráður
        }
        
    }
</head>
<body>
    <div data-role="page" data-theme="b">
        <div data-role="header">
                @if (IsSectionDefined("Header"))
                {
                    @RenderSection("Header")
                }
                else
                {
                    @Html.Partial("_LoginPartial")
                        <h1>@Html.ActionLink("Gleðiland", "Index", "Home")</h1>
                }
        </div>
        <nav>
            <ul id="menu">
                <li>Velkomin <strong>@User.Identity.Name</strong>!</li>
                <li>@Html.ActionLink("About", "About", "Home")</li>
                <li>@Html.ActionLink("Contact", "Contact", "Home")</li>
                <li>@Html.ActionLink("MYLLA", "About", "TTT")</li>
                <li>@Html.ActionLink("EPLI", "About", "ATA")</li>
                <li>@Html.ActionLink("Scoreboard", "Index", "Scoreboard")</li>
                <li>@Html.ActionLink("Leikir í gangi", "Index", "ActiveGame")</li>
                <li>@Html.ActionLink("Users Online", "Active", "Scoreboard")</li>
            </ul>
        </nav>
        <div data-role="content">
            @RenderBody()
        </div>
    </div>
            <div class="float left">
                <p>&copy; @DateTime.Now.Year - @Html.ActionLink("Hafa Samband", "Contact", "Home")</p>
            </div>
    @Scripts.Render("~/bundles/jquerymobile")
    @RenderSection("scripts", required: false)

</body>
</html>
